<?php

use Illuminate\Database\Seeder;

class TestSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $dateTime = date('Y-m-d H:i:s');

        // 更新短信通道配置
        DB::table('configs')->where('key', 'sms')->update([
            'value' => '2',
            'params' => json_encode([
                'tpl' => ['captcha'=>''],
                'appid' => '',
                'signature' => '',
                'access_ak' => '',
                'access_sk' => ''
            ], JSON_UNESCAPED_UNICODE)
        ]);
        // 更新微信公众号配置
        DB::table('configs')->where('key', 'wechat_gzh')->update([
            'value' => '',
            'params' => json_encode([
                'secret' => ''
            ], JSON_UNESCAPED_UNICODE)
        ]);
        // 更新微信小程序配置
        DB::table('configs')->where('key', 'wechat_xcx')->update([
            'value' => '',
            'params' => json_encode([
                'secret' => ''
            ], JSON_UNESCAPED_UNICODE)
        ]);
        DB::table('configs')->where('key', 'wechat_pay')->update([
            'value' => '',
            'params' => json_encode([
                'mch_sk' => '',
                'notify_url' => 'https://support.pysfeicui.com/notify/callback/wechat',
                'client_key_path' => '',
                'client_cert_path' => ''
            ])
        ]);
        // 更新支付宝配置
        DB::table('configs')->where('key', 'alipay_pay')->update([
            'value' => '1',
            'params' => json_encode([
                'appid' => '',
                'alipay_public_key' => ',',
                'merchant_private_key' => '',
                'alipay_cert_path' => '',
                'alipay_root_cert_path' => '',
                'merchant_cert_path' => '',
                'encrypt_key' => '',
                'notify_url' => 'https://support.pysfeicui.com/notify/callback/alipay',
            ])
        ]);
        // 更新子账号价格配置
        DB::table('configs')->where('key', 'sub_account')->update([
            'value' => '0.01'
        ]);
    }
}
